<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <input type="button" value="doit" v-on:click="doit">
        <input type="button" value="简写" @click="doit">
        <button v-on:click="doit">doit</button>
        <button @dblclick="doit">dbldoit</button>
        <h2 @click="changefood">{{message}} </h2>

    </div>

    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <script>
        var app = new Vue({
            el:"#app",
            data:{
                message:"hello,black man",
            },
            methods: {
                doit:function(){
                    alert("lucky man!")
                },
                changefood:function(){
                    this.message+="hello,white man"  
                },
            },
        })
    </script>

</body>
</html>